package com.runfast.waimai.dao.mapper;

import com.runfast.common.dao.IMapper;
import com.runfast.waimai.dao.model.RunfastBusiness;
import com.runfast.waimai.dao.model.RunfastBusinessExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

@Mapper
public interface RunfastBusinessMapper extends IMapper<RunfastBusiness, Integer, RunfastBusinessExample> {
    List<RunfastBusiness> selectBusinessByExampleWithPageable(Map<Object,Object> map);
    List<RunfastBusiness> selectBusinessWithGoods(Map<Object,Object> map);
    Integer countByMap(Map<Object,Object> map);
    Integer countBusinessByExample(Map<Object,Object> map);
    List<RunfastBusiness> selectAcivityByExampleWithPageable(Map<Object,Object> map);
    Integer countAcivityByExampleWithPageable(Map<Object,Object> map);
    Integer countAcivityByExample(Map<Object,Object> map);
    List<RunfastBusiness>  selectRankByMapWithPageable(Map<Object,Object> map);
    Integer countRankByMapWithPageable(Map<Object,Object> map);


    List<RunfastBusiness> getAcivityBusinessByExampleWithPageable(@Param("agentId") Integer agentId, @Param("activityId")Integer activityId,@Param("selectType") Integer selectType,
                                                                  @Param("businessId")Integer businessId, @Param("businessName") String businessName,
                                                                  @Param("pageable")Pageable pageable);
    Integer countAcivityBusinessByExampleWithPageable(@Param("agentId") Integer agentId, @Param("activityId")Integer activityId,@Param("selectType") Integer selectType,
                                                      @Param("businessId")Integer businessId, @Param("businessName") String businessName,
                                                      @Param("pageable")Pageable pageable);
    Map<String,String> getOnlineActivity(@Param("agentId") Integer agentId, @Param("ptype")String ptype,
                                         @Param("activityId")Integer activityId, @Param("businessId")Integer businessId);

}